package view;

import javax.swing.*;
import javax.swing.border.BevelBorder;
import java.awt.*;

/**
 *
 * @author Adam Scarr
 * @since r7
 */
public class MainUI extends JFrame {
    private static MainUI instance;
    private MainMenu mainMenu;
    private LoginUI loginUI;
    

    public MainUI() {
        loginUI = new LoginUI();

        mainMenu = new MainMenu();
        add(mainMenu, BorderLayout.NORTH);

        FlightUI flightpane = new FlightUI();
        flightpane.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));        
        add(flightpane, BorderLayout.CENTER);
        
        setVisible(true);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        pack();
        instance = this;
    }

    public static MainUI getInstance() {
        return instance;
    }

    public MainMenu getMainMenu() {
        return mainMenu;
    }

    public LoginUI getLoginUI() {
        return loginUI;
    }
}